package jws;

import model.User;

import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * Created by jackie on 2017/2/19.
 */
@WebService(endpointInterface = "jws.IMyService")
public class MyServiceImpl implements IMyService {

    @Override
    public int add(int a, int b) {
        System.out.println(a + "+" + b + "=" + (a + b));
        return a + b;
    }

    @Override
    public User login(@WebParam(name = "username") String username,
                      @WebParam(name = "password") String password) {
        System.out.println(username + " is logging");
        User user = new User();
        user.setId("1");
        user.setUserName(username);
        user.setPassword(password);
        return user;

    }
}
